Reducing module open times with several module-level DXL attributes

I have a module which contains lots of module-level DXL attributes which calculate metrics.

Each DXL attribute contains a single #include which retrieves the code to be run from a network location.

This is causing a performance hit as it takes a while to retireive each file from the network.

The DXL metrics themselves don't seem to take a very long time to run (even though they are opening other modules).

 

I've been thinking of ways to improve the performance and can think of a number of ways to achieve this (although none are ideal):

  1. Have a single DXL attribute that calculates the values for all of the other attributes. This will only work when the module is opened for edit mode.
  2. Have a single DXL attribute that calculates the values for all of the other attributes, but stores this in a cache somehow. The other DXL attributes would just then read from a cached value and would not use any #include statements. I've not been able to figure out a way for the values to be cached as each DXL attribute seems to run in its own context.
  3. Use a trigger that only fires when a module is opened for editing. The problem here is that the metrics could be out of date (as they rely on data held in other modules).

Ideally, I would like to go for option 2, but as stated above, I can't figure out where/how I can store a cached value that can be easily retrieved by other DXL attributes and doesn't require the module to be opened in edit mode.


TheNybbler - Tue Jun 09 07:03:39 EDT 2015

Re: Reducing module open times with several module-level DXL attributes
O.Wilkop - Tue Jun 09 07:47:52 EDT 2015

You have several options:

 

1. ADXL - Works the same as a layout DXL, but only calculates the value once it comes into view and caches the result until you press F5 or reopen the module.

2. LDXL - Keep using the LDXL and use the cache function of LDXL (available in DOORS 9.6) so that it only updates the value once every X minutes/hours

3. You could probably write a script or a LDXL that only triggers on the first object, calculate all values and store them in some kind of .xml structure or similar and save it in the DOORS config area (basically a filesystem on the DOORS database) and later retrieve it from there to display the correct value for each object. I'm not sure how fast that is, since you have to retrieve the whole .xml structure, parse it and figure out the value to display for each object. 

 

 

For option 1 you only need to be in edit mode to create the ADXL (so only once in the beginning).

For option 2 you don't need to be in edit mode, ever.

For option 3 you don't need to be in edit mode either, but I'm not sure if you need access rights for the configarea.

Re: Reducing module open times with several module-level DXL attributes
TheNybbler - Tue Jun 09 07:51:09 EDT 2015

O.Wilkop - Tue Jun 09 07:47:52 EDT 2015

You have several options:

 

1. ADXL - Works the same as a layout DXL, but only calculates the value once it comes into view and caches the result until you press F5 or reopen the module.

2. LDXL - Keep using the LDXL and use the cache function of LDXL (available in DOORS 9.6) so that it only updates the value once every X minutes/hours

3. You could probably write a script or a LDXL that only triggers on the first object, calculate all values and store them in some kind of .xml structure or similar and save it in the DOORS config area (basically a filesystem on the DOORS database) and later retrieve it from there to display the correct value for each object. I'm not sure how fast that is, since you have to retrieve the whole .xml structure, parse it and figure out the value to display for each object. 

 

 

For option 1 you only need to be in edit mode to create the ADXL (so only once in the beginning).

For option 2 you don't need to be in edit mode, ever.

For option 3 you don't need to be in edit mode either, but I'm not sure if you need access rights for the configarea.

The DXL attributes are not layout DXL, they are module-level DXL attributes.

I'm using DOORS 9.5, not 9.6.

 

Re: Reducing module open times with several module-level DXL attributes
O.Wilkop - Tue Jun 09 07:58:27 EDT 2015

Oh I skipped the "module level DXL attribute" part. 

So I assume you also only update module level attributes that way.

 

I'd probably try to have one DXL attribute save to the config area then and the other attributes read from there and display the results and see if that speeds up the process.

Re: Reducing module open times with several module-level DXL attributes
TheNybbler - Tue Jun 09 08:03:15 EDT 2015

O.Wilkop - Tue Jun 09 07:58:27 EDT 2015

Oh I skipped the "module level DXL attribute" part. 

So I assume you also only update module level attributes that way.

 

I'd probably try to have one DXL attribute save to the config area then and the other attributes read from there and display the results and see if that speeds up the process.

Do you know where I can find an example of saving something to the DOORS config area?

 

Re: Reducing module open times with several module-level DXL attributes
O.Wilkop - Tue Jun 09 08:32:25 EDT 2015

You can find information for that in Chapter 9 of the DXL Reference Manual, a bit to the bottom under "Configuration file access". It works mostly like a normal write file operation:

 

ConfStream cs = confWrite("filename1", ConfSystem);

cs << "Value1";

close(cs);

cs = confRead("filename1", ConfSystem);
string s;
cs >> s;
print s;
close(cs);

 

Is a very basic example for that.

Re: Reducing module open times with several module-level DXL attributes
TheNybbler - Tue Jun 09 08:36:43 EDT 2015

O.Wilkop - Tue Jun 09 08:32:25 EDT 2015

You can find information for that in Chapter 9 of the DXL Reference Manual, a bit to the bottom under "Configuration file access". It works mostly like a normal write file operation:

 

ConfStream cs = confWrite("filename1", ConfSystem);

cs << "Value1";

close(cs);

cs = confRead("filename1", ConfSystem);
string s;
cs >> s;
print s;
close(cs);

 

Is a very basic example for that.

Thanks for that.

I'll need to investigate if this will speed things up.